package thinkingInJava.containers;

import static thinkingInJava.YTool.YPrint.print;

public class E25_FullSimpleHashMap2 {
	public static void main(String args[]) {
		SimpleHashMap5<String,String> m =
				new SimpleHashMap5<String,String>(),
				m2 = new SimpleHashMap5<String,String>();
		m.putAll(Countries.capitals(10));
		m2.putAll(Countries.capitals(10));
		print("m.size() = " + m.size());
		print("m.isEmpty() = " + m.isEmpty());
		print("m.equals(m2) = " + m.equals(m2));
		print("m.containsKey(\"BENIN\") = " +
				m.containsKey("BENIN"));
		print("m.containsKey(\"MARS\") = " +
				m.containsKey("MARS"));
		print("m.keySet() = " + m.keySet());
		print("m.values() = " + m.values());
		m.remove("ALGERIA");
		print("m = " + m);
	}
} /* Output:
m.size() = 10
m.isEmpty() = false
m.equals(m2) = true
m.containsKey("BENIN") = true
m.containsKey("MARS") = false
m.keySet() = [ANGOLA, CHAD, CAPE VERDE, ALGERIA, BURKINA
FASO, CENTRAL AFRICAN REPUBLIC, BENIN, BOTSWANA, BURUNDI,
CAMEROON]
m.values() = [Luanda, N'djamena, Praia, Algiers,
Ouagadougou, Bangui, Porto-Novo, Gaberone, Bujumbura,
Yaounde]
m = {ANGOLA=Luanda, CHAD=N'djamena, CAPE VERDE=Praia,
BURKINA FASO=Ouagadougou, CENTRAL AFRICAN REPUBLIC=Bangui,
BENIN=Porto-Novo, BOTSWANA=Gaberone, BURUNDI=Bujumbura,
CAMEROON=Yaounde}
 *///:~
